package com.dk.hi;

import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;

import com.dk.hi.core.I18n;
import com.dk.hi.core.Settings;
import com.dk.hi.gui.states.ExplorationState;
import com.dk.hi.gui.states.State;
import com.drakulo.hi.logic.helpers.MouseHelper;

/**
 * <b>Heroes' Inn luncher</b><br>
 * <p>
 * This is the entry point of the game. Here are initialized all game states.
 * </p>
 */
public class HeroesInn extends StateBasedGame {
	/**
	 * @param args
	 *            - Arguments (none for now)
	 * @throws SlickException
	 */
	public static void main(String[] args) throws SlickException {
		AppGameContainer app = new AppGameContainer(new HeroesInn());
		app.setVSync(true);
		app.setDisplayMode(Settings.WINDOW_WIDTH, Settings.WINDOW_HEIGHT, false);
		app.setShowFPS(false);
		// app.setFullscreen(true);
		app.start();
	}

	/**
	 * Constructor
	 */
	public HeroesInn() {
		super(I18n.get("game.title"));
	}

	@Override
	public void initStatesList(GameContainer container) throws SlickException {
		addState(new ExplorationState());

		// Before starting the game, de GameContainer must be initialized in
		// MouseHelper in order
		// to hide or show cursor during the game
		MouseHelper.initialize(container);

		enterState(State.EXPLORATION);
	}
}
